<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../css/font.css">
    <title>携程网</title>
    <style>
        body {
            max-width: 540px;
            min-width: 320px;
            margin: 0 auto;
            font: normal 14px/1.5 Tahoma, "Lucida Grande", Verdana, "Microsoft Yahei", STXihei, hei;
            color: #000;
            background: #f2f2f2;
            overflow-x: hidden;
            /* 防止点击后背景会高亮 */
            -webkit-tap-highlight-color: transparent;
        }
        ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }
        input {
            outline: none;
        }
        a {
            text-decoration: none;
        }
        .search-box {
            display: flex;
            /* 固定定位跟父级没有关系, 它以屏幕为准*/
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            /* 固定的盒子必须有宽度 */
            width: 100%;
            min-width: 320px;
            max-width: 540px;
            height: 44px;
            background-color: #f6f6f6;
            border-top: 1px solid #ccc;
            border-bottom: 1px solid #ccc;
            font-size: 12px;
            color: #666;
            
            align-items: center;
        }
        .search-box .search-index {
            flex: 1;
            position: relative;
            height: 26px;
            padding: 1px 5px;
            margin: 0 12px;
            border: 1px solid #999;
            border-radius: 14px;
            background-color: white;
            padding-left: 35px;
            /* text-indent: 25px; */
            line-height: 24px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
        }
        .search-box .search-index::before {
            content: "";
            /* 注意 它的父亲是.search-box .search-index */
            position: absolute;
            top: 5px;
            left: 15px;
            width: 15px;
            height: 15px;
            background: url(../images/png/xcw.png) no-repeat;
            background-size: 21px;
        }
        .user {
            /* display: flex; */
            width: 44px;
            height: 44px;
            /* background-color: teal; */
            color: #888;
            text-align: center;
        }
        .user::before {
            content: "";
            display: block;
            width: 21px;
            height: 21px;
            background: url(../images/png/xcw.png) no-repeat 0 -78px;
            background-size: 21px auto;
            margin: 3px auto 0;
        }
        .focus img{
            width: 100%;
        }
        .local-nav {
            display: flex;
            height: 64px;
            background-color: thistle;
            margin: 3px 4px;
            border: 1px solid #ccc;
            border-radius: 8px;
        }
        .local-nav li {
            flex: 1;
        }
        .local-nav li a {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .local-nav li a span:first-child {
            width: 40px;
            height: 40px;
            background: url(../images/png/xcw-home.15.png) no-repeat;
            background-size: 40px auto;
        }
        .local-nav li:nth-child(2) a span:first-child {
            background-position-y: -40px;
        }
        .local-nav li:nth-child(3) a span:first-child {
            background-position-y: -80px;
        }
        .local-nav li:nth-child(4) a span:first-child {
            background-position-y: -120px;
        }
        .local-nav li:nth-child(5) a span:first-child {
            background-position-y: -160px;
        }
        .content {
            min-width: 320px;
            max-width: 540px;
            height: 400px;
            background-color: aqua;
        }
        .content .title {
            width: 100%;
            height: 40px;
            background-color: beige;
        }
        .content .title::before {
            display: inline-block;
            content: '';
            height: 40px;
            width: 40px;
            background: url(../images/png/2.png) no-repeat center;
        }
        .content .title::after {
            float: right;
            content: '';
            height: 40px;
            width: 40px;
            background: url(../images/png/2.png) no-repeat center;
            transform: rotate(45deg);
        }
        .content ul {
            display: flex;
            background-color: blue;
            flex-wrap: wrap;
            /* flex-direction: column; */
            /* align-items: center; */
        }
        .content li {
            flex: 50%;
            /* width: 200px; */
            height: 120px;
            background-color: brown;
        }
        .content li:nth-child(-n+2) {
            background-color: chartreuse;
        }
        /* span{
            width: 120px;
            background-color: blanchedalmond;
        } */
    </style>
</head>
<body>
    <div class="search-box">
        <div class="search-index">
            搜索:目的地/酒店/景点/航班号
        </div>
        <a href="#" class="user">我 的</a>
    </div>
    <div class="focus">
        <img src="../images/jpg/xcw.jpg" alt="">
    </div>
    <!-- 局部导航栏 -->
    <ul class="local-nav">
        <li>
            <a href="#" title="景点·玩乐">
                <span class="local-nav-icon"></span>
                <span>景点·玩乐</span>
            </a>
        </li>
        <li>
            <a href="#">
                <span class="local-nav-icon"></span>
                <span>周边游</span>
            </a>
        </li>
        <li>
            <a href="#">
                <span class="local-nav-icon"></span>
                <span>美食林</span>
            </a>
        </li>
        <li>
            <a href="#">
                <span class="local-nav-icon"></span>
                <span>景点·玩乐</span>
            </a>
        </li>
        <li>
            <a href="#">
                <span class="local-nav-icon"></span>
                <span>景点·玩乐</span>
            </a>
        </li>
    </ul>
    <div class="content">
        <div class="title"></div>
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>4</li>
            <li>4</li>
        </ul>
    </div>
</body>
</html>